<?php
/**
 * Created by Zhy
 * User: Zhy
 * Date: 2019/8/12
 * Time: 16:15
 */

namespace app\api\controller;


use think\Controller;
use think\Db;

class Timing extends Controller
{
    /**
     * 每日凌晨00:00:00初始化用户验证码发送的次数
     */
    public function clearCodeNum(){
        Db::table('up_phonecode')->where('id', '>', 0)->update(['send_num' => 0]);
    }
    public function dowload() {//echo 1;die;
        $agent = strtolower($_SERVER['HTTP_USER_AGENT']);
        if(strpos($agent, 'iphone') || strpos($agent, 'ipad'))
        {
//            echo "<script> location.href='https://itunes.apple.com/cn/app/id1461726813'; </script>";
            echo 'ios 下载地址';
        }else{
//            echo "<script> location.href='http://ydmm.csyuedu.com/dowload/heart.apk'; </script>";
            echo 'Android 下载地址';
        }

    }
}